package com.ry.est.annotations;

import org.springframework.stereotype.Component;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author ry
 * @since 2021-11-15 15:15
 **/
@Target({ElementType.METHOD,ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = TemporalIntervalTimeSegmentValidator.class)
public @interface TemporalIntervalTimeSegment {

    //必须加上groups和payload这两个域
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    int[] values() default {};

    String message() default "预约时间段不正确";
}
